"use strict";
//ES代码
// enum Direction {
//   Up,
//   Down,
//   Left,
//   Right,
// }
var Direction;
(function (Direction) {
    Direction[Direction["Up"] = 5] = "Up";
    Direction[Direction["Down"] = 6] = "Down";
    Direction[Direction["Left"] = 7] = "Left";
    Direction[Direction["Right"] = 8] = "Right";
})(Direction || (Direction = {}));
function walk(direction) {
    if (direction == Direction.Up) {
        console.log("向上走");
    }
    if (direction == Direction.Down) {
        console.log("向下走");
    }
}
walk(Direction.Up);
walk(Direction.Down);
console.log("Direction", Direction);
console.log("Direction.Up", Direction.Up);
console.log("Direction.Down", Direction.Down);
var Week;
(function (Week) {
    Week[Week["Mon"] = 1] = "Mon";
    Week[Week["Tues"] = 2] = "Tues";
    Week[Week["Wed"] = 3] = "Wed";
    Week[Week["Thus"] = 4] = "Thus";
    Week[Week["Fri"] = 5] = "Fri";
    Week[Week["Sat"] = 6] = "Sat";
    Week[Week["Sun"] = 0] = "Sun";
})(Week || (Week = {}));
console.log("Week", Week);
console.log("Week[0] ", Week[0]);
console.log("Week[1] ", Week[1]);
console.log("Week[2] ", Week[2]);
console.log("Week[3] ", Week[3]);
console.log("Week[4] ", Week[4]);
console.log("Week[5] ", Week[5]);
console.log("Week[6] ", Week[6]);
//字符串类型的枚举
var StrDirection;
(function (StrDirection) {
    StrDirection["Up"] = "up";
    StrDirection["Down"] = "down";
    StrDirection["Left"] = "left";
    StrDirection["Right"] = "right";
})(StrDirection || (StrDirection = {}));
console.log("StrDirection", StrDirection);
// StrDirection[0]
